<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>问题反馈</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('pay/question/index')}">
        关键字:
        <input type="text" class="form-control" name="question_content" style="width: 200px;"
               value="{$question_content|default=''}" placeholder="请输入关键字...">
        处理标记:
        <select class="form-control" name="question_status" style="width: 140px;">
            <option <if $question_status == ''> selected </if> value=''>全部</option>
            <option <if $question_status == '1'> selected </if> value='1'>已处理</option>
            <option <if $question_status == '0'> selected </if> value='0'>未处理</option>
        </select> &nbsp;&nbsp;
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('pay/question/index')}">清空</a>
    </form>
    <form class="js-ajax-form" action="" method="post">
        <div class="table-actions">
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('pay/question/publish',array('yes'=>1))}" data-subcheck="true">处理
            </button>
            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('pay/question/delete')}" data-subcheck="true" data-msg="您确定删除吗？">
                {:lang('DELETE')}
            </button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="50">ID</th>
                <th>反馈内容</th>
                <th>用户</th>
                <th>反馈时间</th>
                <th>处理标记</th>
                <th>操作</th>
            </tr>
            </thead>
            <foreach name="list" item="vo">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}" title="ID:{$vo.id}">
                    </td>
                    <td><b>{$vo.id}</b></td>
                    <td>{$vo.question_content}</td>
                    <td>{$vo.user_login}</td>
                    <td>
                        {:date('Y-m-d H:i:s',$vo['create_time'])}
                    </td>
                    <td>
                        <if condition="$vo['question_status'] == 1">
                            <span class="label label-success">已处理</span>
                            <else/>
                            <span class="label label-danger">未处理</span>
                        </if>
                    </td>
                    <td>
                        <if condition="$vo['question_status'] == 0">
                            <a class="btn btn-xs btn-success js-ajax-delete" href="{:url('pay/question/publish',array('id'=>$vo['id'],'question_status'=>1))}">标记处理</a>
                            <else/>
                            <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('pay/question/publish',array('id'=>$vo['id'],'question_status'=>0))}">取消标记</a>
                        </if>
                        <a class="btn btn-xs btn-danger js-ajax-delete"
                           href="{:url('pay/question/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
        </table>
        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>